[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
record                   Declares a Record (Group of Variables)

 type
   <tname>  = record
      <field>;
      <field>;
      ...;
      <field>
   end;

 var
   <vname>  : record
      <field>;
      <field>;
      ...;
      <field>
   end;

    Use RECORD to declare records, which are collections of variables, not
    necessarily of the same type.

            <tname>   name of data type being defined.

            <vname>   name of variable being declared.

            <field>   definition of one or more fields (variables) within
                      the record, taking the format:

                          <fnames> : <basetype>;

           <fnames>   Name of the field(s) being defined. If more than
                      one, then separated by commas.

         <basetype>   any Pascal data type or definition.

  -------------------------------- Example ---------------------------------

           type
             Student = record
               Last,First : string[20];
               SSN        : string[9];
               GPA        : Real;
               ClassCnt   : Integer;
               Class      : array[1..6] of ClassRec;
               Passing    : Boolean
             end;

See Also: array packed end
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson